package com.wechat.pojo;

import lombok.*;

import javax.xml.bind.annotation.*;
import java.io.Serializable;

/**
 * @author why
 * @date 2017/12/20 0020
 */
@XmlAccessorType(XmlAccessType.FIELD)
// XML文件中的根标识
@XmlRootElement(name = "xml")
// 控制JAXB 绑定类中属性和字段的排序
/*@XmlType(propOrder = {
        "Content",
})*/

@Data
@AllArgsConstructor(access = AccessLevel.PUBLIC)
@NoArgsConstructor(access = AccessLevel.PUBLIC)
public class WechatTextMessage extends WechatMessage implements Serializable {
    private static final long serialVersionUID = 4347023076691398351L;

    public WechatTextMessage(String toUserName, String ftromUserName, String createTime, String msgType, String content) {
        super(toUserName, ftromUserName, createTime, msgType);
        this.content = content;
    }

    @NonNull
    @XmlElement(name="Content")
    private String content;

}
